package cn.itsource.app;

import cn.itsource.pojo.domain.dto.wxRegisterDto;
import cn.itsource.result.R;
import cn.itsource.service.IDriverService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;

@Tag(name = "小程序司机对象",description = "小程序司机对象")
@RestController
@RequestMapping("/app/driver")
@Validated
public class AppDriverController {
    @Autowired
    public IDriverService driverService;

    @Operation( summary= "司机注册",description = "司机注册接口")
    @PostMapping("/wxRegister")
    public R<Boolean> wxRegister(@RequestBody @Valid wxRegisterDto wxRegisterDto){
        driverService.wxRegister(wxRegisterDto);
        return R.success();
    }
}
